package demo02成员内部类;

public class Outer {

    private int num = 10;


/*    public class Inner{
        public void show(){
            System.out.println(num);
        }
    }*/

    //一般用于隐藏，不想让外界知道,通过调用method()方法来调用Inner类
    private class Inner{
        public void show(){
            System.out.println(num);
        }
    }

    public void method(){
        Inner inner = new Inner();
        inner.show();
    }
}
